package com.sgcc.pda.util;

import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

/**
 * Created by  rzh
 * on 2019/7/17
 */

/**
 * 创建fixed 线程池
 */
public class FixedThreadUtil {
    private static ExecutorService fixedThreadPool;
    public FixedThreadUtil() {
    }
    public static void executeThread(Runnable runnable) {
        if (fixedThreadPool == null){
            fixedThreadPool = Executors.newFixedThreadPool(10);
        }
        fixedThreadPool.execute(runnable);
    }
}
